package Adapt;
//对象适配器模式
class ObjectAdapter implements Target{
    private Adaptee adaptee = new Adaptee();
    public ObjectAdapter(Adaptee adaptee){
        this.adaptee = adaptee;
    }
    @Override
    public void request() {
        adaptee.specificRequest();
    }
}
public class ObjectAdapterTest {
    public static void main(String[] args) {
        System.out.println("对象适配器模式测试：");
        Adaptee adaptee = new Adaptee();
        Target t = new ObjectAdapter(adaptee);
        t.request();
    }
}
